﻿	CREATE TABLE public.feature	(
	    /***************************************************************************************************
	    **  Table:	    public.feature
	    **  Author:		Zhixian Ong
	    **
	    **  Description:
	    **    
	    **    Represents a registered feature.
	    **
	    **  Fields (2):
	    **
	    **      id              - candidate key
	    **      name            - feature name
	    **      privilege_id    - privilege id
	    **      controller_id   - controller id
	    **
	    **  Constaints (2):
	    **
	    **      feature_pk  - 
	    **      feature_uc  - 
	    **      
	    **
	    **  Modification History:
	    **
	    **      20140102  Zhixian Ong     - Initial prototype
	    ** 
	    **  Status:
	    **      Dev
	    ** 
	    ***************************************************************************************************/
        
	    -- [Fields]
	    id                  integer                 NOT NULL DEFAULT nextval('feature_id_seq'),
	    name                character varying(128)  NOT NULL,
	    privilege_id        integer                 NOT NULL,
	    controller_id       integer                 NOT NULL,
	    
        
	    -- [Constraints]
	    CONSTRAINT feature_pk   PRIMARY KEY ("id"),
	    CONSTRAINT feature_uc   UNIQUE ("name")
	);